package com.hd.pzhwlxt.controller.model6;

import com.hd.pzhwlxt.mapper.IndexDataVoMapper;
import com.hd.pzhwlxt.pojo.IndexDataVo;
import com.hd.pzhwlxt.utils.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @create: 2022-09-28 9:26
 * @author: 怀念天空
 * @Description:
 */
@RestController
public class IndexAnalysisController {

    @Autowired
    private IndexDataVoMapper indexDataVoMapper;

    @GetMapping("/indexDate")
    public Response<Object> getIndexDate(){
        IndexDataVo data = new IndexDataVo();
        data.setPersonNum(indexDataVoMapper.getPersonNum());
        data.setMessage(indexDataVoMapper.getMessage());
        data.setTransNum(indexDataVoMapper.getTransNum());
        data.setGoodsValue(indexDataVoMapper.getGoodsValue());

        data.setOrderToDo(indexDataVoMapper.getOrderToDo());
        data.setGoodsPurchase(indexDataVoMapper.getGoodsPurchase());
        data.setMaterialPurchase(indexDataVoMapper.getMaterialPurchase());
        data.setTransOrderToDo(indexDataVoMapper.getTransOrderToDo());

        data.setOfficeMaterialUsage(indexDataVoMapper.getOfficeMaterialUsage());
        data.setTransGoodsToday(indexDataVoMapper.getTransGoodsToday());
        data.setMaterialUsageToday(indexDataVoMapper.getMaterialUsageToday());
        data.setSalaryToday(indexDataVoMapper.getSalaryToday());
        return Response.createSuccessResponse("查询成功",data);
    }
}
